<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="shortcut icon" href="{{ url_for('static', filename='images/favicon.ico') }}">
    {% block head %}{% endblock %}
    <title> {{name}} | {% block title %}标题{% endblock %}</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='plugins/bootstrap/css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='plugins/font-awesome/css/font-awesome.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='plugins/ionicons/css/ionicons.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='plugins/bootstrap-slider/slider.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='plugins/pace/pace.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='plugins/bootstrap-switch/bootstrap-switch.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='plugins/select2/select2.min.css') }}">
    {% block css %}{% endblock %}
    <link rel="stylesheet" href="{{ url_for('static', filename='plugins/adminlte/css/AdminLTE.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='plugins/adminlte/css/skins/skin-blue.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/global.css') }}">
    <!-- <link rel="stylesheet" href="{{ url_for('static', filename='plugins/bootstrap-datepicker/css/daterangepicker.css') }}"> -->
    <!--[if lt IE 9]>
    <script src="plugins/html5shiv.min.js"></script>
    <script src="plugins/respond.min.js"></script>
    <![endif]-->
</head>

<body class="hold-transition skin-blue sidebar-mini">
    <div class="wrapper">
        <!--头部-->
        <header class="main-header">
            <a href="{{ url_for('main.index') }}" class="logo">
                <span class="logo-mini"><b>{{min_name}}</b></span>
                <span class="logo-lg"><b>{{name}}</b></span>
            </a>
            <nav class="navbar navbar-static-top">
                <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </a>
                <div class="navbar-custom-menu">
                    <ul class="nav navbar-nav">
                        <li class="dropdown user user-menu">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                <img src="{{ url_for('static', filename='images/avatar.jpg') }}" class="user-image"
                                    alt="User Image">
                                <span class="hidden-xs">{{current_user.username}}</span>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="user-header">
                                    <img src="{{ url_for('static', filename='images/avatar.jpg') }}" class="img-circle"
                                        alt="User Image">
                                    <p>
                                        <a href="{{url_for('main.my')}}"><span>{{current_user.fullname}}</span></a>
                                        <small>{{current_user.email}}</small>
                                    </p>
                                </li>
                                <li class="user-footer">
                                    <div class="pull-left">
                                        <a href="{{ url_for('main.changepasswd') }}"
                                            class="btn btn-default btn-flat">修改密码</a>
                                    </div>
                                    <div class="pull-right">
                                        <a href="{{ url_for('auth.logout') }}" class="btn btn-default btn-flat">退出登录</a>
                                    </div>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>
        <!--侧边栏-->
        <aside class="main-sidebar">
            <section class="sidebar">
                <ul class="sidebar-menu">
                    <li class="header">功能导航</li>
                    <li>
                        <a href="{{ url_for('main.index') }}">
                            <i class="fa fa-home"></i>
                            <span>首页</span>
                        </a>
                    </li>
                    <!--可配置菜单-->
                    {% for menu in menus %}
                        {% if not menu.childs %}
                        <!--顶级菜单-->
                        <li>
                            <a href="/comm/{{menu.route}}">
                                <i class="{{menu.icon}}"></i>
                                <span>{{menu.name}}</span>
                            </a>
                        </li>
                        {% endif%}
                        {% if menu.childs %}
                        <li class="treeview">
                            <a href="#">
                                <i class="{{menu.icon}}"></i>
                                <span>{{menu.name}}</span>
                                <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
                            </a>
                            <ul class="treeview-menu">
                                {% for child in menu.childs %}
                                <li><a href="/comm/{{child.route if child.route else '#'}}"><i class="{{child.icon}}"></i> {{child.name}}</a></li>
                                {% endfor %}
                            </ul>
                        </li>
                        {% endif %}
                    {% endfor %}
                    <!--系统设置-->
                    <li class="treeview">
                        <a href="#">
                            <i class="fa fa-cog"></i>
                            <span>系统设置</span>
                            <span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
                        </a>
                        <ul class="treeview-menu">
                            <li><a href="{{url_for('main.serverlist')}}"><i class="fa fa-bars"></i> 服务器管理</a></li>
                            <li><a href="{{url_for('main.menulist')}}"><i class="fa fa-bars"></i> 菜单管理</a></li>
                            <li><a href="{{url_for('main.grouplist')}}"><i class="fa fa-group"></i> 角色管理</a></li>
                            <li><a href="{{url_for('main.permissionlist')}}"><i class="fa fa-feed"></i> 权限管理</a></li>
                            <li><a href="{{url_for('main.userlist')}}"><i class="fa fa-user"></i> 用户管理</a></li>
                        </ul>
                    </li>

                </ul>
            </section>
        </aside>

        <div class="content-wrapper">
            <!--导航栏-->
            {% block navbar %}{% endblock %}
            <!--正文-->
            <section class="content">
                {% block content %}{% endblock %}

            </section>
        </div>
        <!--页脚-->
        <footer class="main-footer">
            <div class="pull-right hidden-xs">
                <b>版本号</b> 1.0.0
            </div>
            Copyright &copy; 2019 <a href="{{web_url}}">{{company}}</a>
        </footer>
        <!--模态窗口-->
        <div class="modal-wrapper">
            <div id="alert-modal" class="modal fade">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <!--<button type="button" class="close" data-dismiss="modal" aria-label="Close">-->
                            <!--<span aria-hidden="true">&times;</span></button>-->
                            <h4 class="modal-title">提示</h4>
                        </div>
                        <div class="modal-body">
                            提示内容
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default pull-left btn-no"
                                data-dismiss="modal">取消</button>
                            <button type="button" class="btn btn-default btn-yes" data-dismiss="modal">确定</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script src="{{ url_for('static', filename='plugins/jQuery/jquery-2.2.3.min.js') }}"></script>
    <script src="{{ url_for('static', filename='plugins/bootstrap/js/bootstrap.min.js') }}"></script>
    <script src="{{ url_for('static', filename='plugins/slimScroll/jquery.slimscroll.min.js') }}"></script>
    <script src="{{ url_for('static', filename='plugins/fastclick/fastclick.js') }}"></script>
    <script src="{{ url_for('static', filename='plugins/bootstrap-slider/bootstrap-slider.js') }}"></script>
    <script src="{{ url_for('static', filename='plugins/pace/pace.min.js') }}"></script>
    <script src="{{ url_for('static', filename='plugins/bootstrap-switch/bootstrap-switch.min.js') }}"></script>
    <script src="{{ url_for('static', filename='plugins/select2/select2.full.min.js') }}"></script>
    <script src="{{ url_for('static', filename='plugins/adminlte/js/app.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/global.js') }}"></script>
    <!-- <script src="{{ url_for('static', filename='plugins/bootstrap-datepicker/js/daterangepicker.js') }}"></script> -->
    {% block scripts %}{% endblock %}
</body>

</html>